https://glot.io/snippets/gicdjrhkpi/raw/main.lua